import request from "./request";

export const addReply = (form) => {
  return request({
    url: '/api/reply/add',
    method: 'post',
    data: form,
    headers: {
      'Content-Type': 'application/json'
    }
  })
}

export const getRepliesByPostId = (postId) => {
  return request({
    url: `/api/reply/post/${postId}`,
    method: 'get'
  })
}

export const deleteReply = (replyId,userId) => {
  return request({
    url: `/api/reply/reply/${replyId}/user/${userId}`,
    method: 'delete'
  })
}